<%--
  Created by IntelliJ IDEA.
  User: longchn
  Date: 2022/4/14
  Time: 15:46
  To change this template use File | Settings | File Templates.
--%>

<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<html>
<head>
    <title>用户列表</title>
    <script src="/assets/js/jquery.min.js"></script>
</head>
<body>
<div>

    <input type="button" value="添加" style="margin-left: 35%;"  onclick="openwin()">

    <table  border="1" cellpading="0" cellspacing="0" style="margin:20px auto;width:500px;+">
        <tr>
            <th>ID</th>
            <th>姓名</th>
            <th>操作</th>
        </tr>

        <c:forEach items="${userList}"  var="emp"  >
            <tr>
                <td>${emp.id}</td>
                <td>${emp.userid}</td>
                <td>
                    <a href="./user_edit.action?id=${emp.id}">修改</a>
                    <a href="./user_del.action?id=${emp.id}">删除</a>
                </td>
            </tr>
        </c:forEach>

    </table>
</div>
<script>
    function openwin(){

        // window.open("/main/add.jsp", "newwindow","height=100, width=400, toolbar=no,menubar=no, scrollbars=no,resizable=no, location=no,status=no");
        window.open("/main/add.jsp","_self");
    }
</script>
</body>
</html>
